$(function() {
	new Vue({
		el: "#plartShopListApp",
		data: {
			searchShop:"",
			fullscreenLoading:false,
			currentPage:1,
			totalSize:1,
			tableData: []
		},
		created:function(){
			parent.vueData.$data.hreHtml = "../platShopList/index.html";
			parent.vueData.activeIndex = "7";
			parent.vueData.getLeftNav("7")
			parent.vueData.$data.categoryIndex = 0
			this.getPlartShopList()
		},
		methods:{
            getPlartShopList(){
			    this.fullscreenLoading = true;
			    axios({
			    	url: POSTURL.getAlltDealerShop,
			    	method: 'post',
			    	data: {}
			    }).then(response => {
			    	this.fullscreenLoading = false;
			    	if (response.data.code === 100) {
			    		
			    		this.tableData = response.data.result
			    	} else {
			    		this.$message.error(response.data.message);
			    	}
			    }).catch(error => {
			    	this.fullscreenLoading = false;
			    	console.log(error);
			    	this.$message.error('服务器出错!');
			    })
			} ,
			addShopClick(){
				parent.vueData.handleOpen(72, 0);
			},
			deletShop(val){
				
				this.fullscreenLoading = true;
				let param = {
					data: val.uid,
				}
				axios({
					url: POSTURL.deleteShop,
					method: 'post',
					data: param
				}).then(response => {
					this.fullscreenLoading = false;
					if (response.data.code === 100) {
						this.getApplyShopList(1)
					} else {
						this.$message.error(response.data.message);
					}
				}).catch(error => {
					this.fullscreenLoading = false;
					console.log(error);
					this.$message.error('服务器出错!');
				})
			},
			resumeShop(val){
				this.fullscreenLoading = true;
				let param = {
					data: val.uid,
				}
				axios({
					url: POSTURL.relieveShop,
					method: 'post',
					data: param
				}).then(response => {
					this.fullscreenLoading = false;
					if (response.data.code === 100) {
						this.getPlartShopList()
					} else {
						this.$message.error(response.data.message);
					}
				}).catch(error => {
					this.fullscreenLoading = false;
					console.log(error);
					this.$message.error('服务器出错!');
				})
			},
			handleCurrentChange(val){
				
			}
		}
	})
})
